<template>
  <div class="uni-buttons uni-flex">
    <div class="uni-button" @click="toggleMode">{{viewMode}}</div>
  </div>
</template>

<script>
  export default {
    name: 'LoraButtons',
    components: {
    },
    data() {
      return {
        viewMode: '2D'
      }
    },
    methods: {
      toggleMode(){
        this.$emit("onToggleMode", this.viewMode, ()=>{
          this.viewMode = this.viewMode === '2D' ? '3D' : '2D'
        })
      }
    }
  }
</script>
<style scoped>
  .uni-button {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #D9D9D9;
    line-height: 38px;
    text-align: center;
    font-size: 18px;
    background-color: #f4f4f4;
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Chrome/Safari/Opera */
    -khtml-user-select: none; /* Konqueror */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none; /* Non-prefixed version, currently not supported by any browser */
  }
</style>
